inherited FRelatorioMargemCustoXVenda: TFRelatorioMargemCustoXVenda
  Left = 384
  Top = 140
  Caption = 'ESTOQUE / INVENT'#193'RIO'
  OldCreateOrder = True
  PixelsPerInch = 96
  TextHeight = 16
  inherited Panel1: TPanel
    Top = 28
    Height = 31
    inherited btnPesquisar: TBitBtn
      Top = 1
    end
    inherited lbResultado: TStaticText
      Top = 7
    end
  end
  inherited Panel2: TPanel
    Height = 28
    Caption = 'RELAT'#211'RIO INVENT'#193'RIO (BANDEIRANTES)'
  end
  inherited GroupBox1: TGroupBox
    object Label66: TLabel
      Left = 16
      Top = 21
      Width = 91
      Height = 16
      Caption = 'Estoque / Local'
      Font.Charset = ANSI_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Arial'
      Font.Style = []
      ParentFont = False
    end
    object Label3: TLabel
      Left = 16
      Top = 64
      Width = 102
      Height = 16
      Caption = 'Grupo do Produto'
    end
    object Label53: TLabel
      Left = 16
      Top = 113
      Width = 171
      Height = 16
      Caption = 'Classifica'#231#227'o do Produto (F8)'
    end
    object DBLCBLocal: TDBLookupComboBox
      Left = 16
      Top = 37
      Width = 281
      Height = 22
      Ctl3D = False
      KeyField = 'LOC_CODIGO'
      ListField = 'LOC_DESCRICAO'
      ListSource = DSLocal
      ParentCtl3D = False
      TabOrder = 0
    end
    object DBLCBGrupoProduto: TDBLookupComboBox
      Left = 16
      Top = 81
      Width = 281
      Height = 22
      Ctl3D = False
      KeyField = 'GRUP_PROD_CODIGO'
      ListField = 'GRUP_PROD_DESCRICAO'
      ListSource = DSGropoProduto
      ParentCtl3D = False
      TabOrder = 1
      OnKeyDown = DBLCBGrupoProdutoKeyDown
    end
    object dblClassProduto: TDBLookupComboBox
      Left = 16
      Top = 131
      Width = 281
      Height = 22
      Ctl3D = False
      KeyField = 'ESTRUTURA'
      ListField = 'CLASS_PROD_DESCRICAO'
      ListSource = DSClassProduto
      ParentCtl3D = False
      TabOrder = 2
      OnKeyDown = dblClassProdutoKeyDown
    end
    object GroupBox8: TGroupBox
      Left = 17
      Top = 159
      Width = 160
      Height = 60
      Caption = ' Situa'#231#227'o '
      TabOrder = 3
      object CbSitAtivo: TCheckBox
        Left = 8
        Top = 28
        Width = 57
        Height = 17
        Caption = 'Ativos'
        TabOrder = 0
      end
      object CbSitInativo: TCheckBox
        Left = 80
        Top = 28
        Width = 73
        Height = 17
        Caption = 'Inativos'
        TabOrder = 1
      end
    end
    object GroupBox9: TGroupBox
      Left = 16
      Top = 221
      Width = 217
      Height = 60
      Caption = ' Quantidade '
      TabOrder = 4
      object CbComQtd: TCheckBox
        Left = 8
        Top = 28
        Width = 97
        Height = 17
        Caption = 'Com Quant.'
        TabOrder = 0
      end
      object CbSemQtd: TCheckBox
        Left = 112
        Top = 28
        Width = 97
        Height = 17
        Caption = 'Sem Quant.'
        TabOrder = 1
      end
    end
  end
  inherited GroupBox2: TGroupBox
    object RgOrdenar: TRadioGroup
      Left = 8
      Top = 64
      Width = 273
      Height = 89
      Caption = '  Ordenar  '
      ItemIndex = 0
      Items.Strings = (
        'C'#243'digo'
        'Descri'#231#227'o'
        'Refer'#234'ncia do fornecedor')
      TabOrder = 5
    end
    object RadioGroup1: TRadioGroup
      Left = 8
      Top = 155
      Width = 273
      Height = 57
      Caption = '  Agrupar  '
      Columns = 3
      ItemIndex = 2
      Items.Strings = (
        'Classific.'
        'Grupo'
        'Nenhum')
      TabOrder = 6
    end
  end
  inherited RLReport: TRLReport
    Top = 469
    DataSource = DSPesquisa
    inherited RLBand1: TRLBand
      Height = 48
      inherited RLMemo: TRLMemo
        Top = 24
        Height = 14
        ParentColor = False
        Transparent = False
      end
    end
    object RLBand2: TRLBand
      Left = 38
      Top = 86
      Width = 718
      Height = 36
      BandType = btColumnHeader
      Borders.Sides = sdCustom
      Borders.DrawLeft = False
      Borders.DrawTop = False
      Borders.DrawRight = False
      Borders.DrawBottom = True
      Borders.FixedBottom = True
      object RLLabel1: TRLLabel
        Left = 4
        Top = 2
        Width = 36
        Height = 14
        Caption = 'C'#243'digo'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel2: TRLLabel
        Left = 4
        Top = 18
        Width = 56
        Height = 14
        Caption = 'Referencia'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel3: TRLLabel
        Left = 95
        Top = 2
        Width = 92
        Height = 14
        Caption = 'Descri'#231#227'o Entrada'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel4: TRLLabel
        Left = 503
        Top = 2
        Width = 63
        Height = 14
        Caption = 'Valor Custo.'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel5: TRLLabel
        Left = 383
        Top = 2
        Width = 23
        Height = 14
        Alignment = taRightJustify
        Caption = 'Qtd.'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel6: TRLLabel
        Left = 586
        Top = 2
        Width = 67
        Height = 14
        Caption = 'Valor Venda.'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel7: TRLLabel
        Left = 665
        Top = 2
        Width = 51
        Height = 14
        Caption = '%Margem'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel8: TRLLabel
        Left = 95
        Top = 19
        Width = 82
        Height = 14
        Caption = 'Descri'#231#227'o Saida'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel9: TRLLabel
        Left = 385
        Top = 18
        Width = 21
        Height = 14
        Alignment = taRightJustify
        Caption = 'Sist'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel10: TRLLabel
        Left = 426
        Top = 2
        Width = 58
        Height = 14
        Alignment = taRightJustify
        Caption = 'Vr. Compra'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel11: TRLLabel
        Left = 431
        Top = 18
        Width = 53
        Height = 14
        Alignment = taRightJustify
        Caption = 'Vr. Venda'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel16: TRLLabel
        Left = 505
        Top = 17
        Width = 58
        Height = 14
        Caption = 'Ult. Compra'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel17: TRLLabel
        Left = 622
        Top = 18
        Width = 31
        Height = 14
        Caption = 'N'#186' NF'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object RLLabel18: TRLLabel
        Left = 657
        Top = 17
        Width = 59
        Height = 14
        Caption = 'Dt. Emiss'#227'o'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
    end
    object RLGroup1: TRLGroup
      Left = 38
      Top = 122
      Width = 718
      Height = 77
      object RLBand3: TRLBand
        Left = 0
        Top = 23
        Width = 718
        Height = 36
        Borders.Sides = sdCustom
        Borders.DrawLeft = False
        Borders.DrawTop = False
        Borders.DrawRight = False
        Borders.DrawBottom = True
        BeforePrint = RLBand3BeforePrint
        object RLDBText6: TRLDBText
          Left = 414
          Top = 2
          Width = 70
          Height = 15
          Alignment = taRightJustify
          AutoSize = False
          DataField = 'PROD_VALORCOMPRA'
          DataSource = DSPesquisa
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -11
          Font.Name = 'Arial'
          Font.Style = []
          ParentFont = False
        end
        object RLDBText5: TRLDBText
          Left = 486
          Top = 2
          Width = 81
          Height = 14
          Alignment = taRightJustify
          DataField = 'VALOR_CUSTO'
          DataSource = DSPesquisa
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -11
          Font.Name = 'Arial'
          Font.Style = []
          ParentFont = False
        end
        object RLDBText3: TRLDBText
          Left = 95
          Top = 2
          Width = 279
          Height = 15
          AutoSize = False
          DataField = 'PROD_DESCRICAOENT'
          DataSource = DSPesquisa
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -11
          Font.Name = 'Arial'
          Font.Style = []
          ParentFont = False
        end
        object RLDBText4: TRLDBText
          Left = 4
          Top = 17
          Width = 87
          Height = 15
          AutoSize = False
          DataField = 'PROD_REFERENCIA'
          DataSource = DSPesquisa
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -11
          Font.Name = 'Arial'
          Font.Style = []
          ParentFont = False
        end
        object RLDBText2: TRLDBText
          Left = 4
          Top = 2
          Width = 38
          Height = 15
          AutoSize = False
          DataField = 'PROD_CODIGO'
          DataSource = DSPesquisa
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -11
          Font.Name = 'Arial'
          Font.Style = []
          ParentFont = False
        end
        object RLDBText7: TRLDBText
          Left = 571
          Top = 2
          Width = 82
          Height = 14
          Alignment = taRightJustify
          DataField = 'VALOR_VENDA'
          DataSource = DSPesquisa
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -11
          Font.Name = 'Arial'
          Font.Style = []
          ParentFont = False
        end
        object RLDBText9: TRLDBText
          Left = 95
          Top = 16
          Width = 279
          Height = 15
          AutoSize = False
          DataField = 'PROD_DESCRICAOSAI'
          DataSource = DSPesquisa
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -11
          Font.Name = 'Arial'
          Font.Style = []
          ParentFont = False
        end
        object RLLabel13: TRLLabel
          Left = 665
          Top = 3
          Width = 51
          Height = 14
          Alignment = taRightJustify
          Caption = '%Margem'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -11
          Font.Name = 'Arial'
          Font.Style = []
          ParentFont = False
        end
        object RLLabel12: TRLLabel
          Left = 701
          Top = 20
          Width = 15
          Height = 14
          Alignment = taRightJustify
          Caption = '---'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -11
          Font.Name = 'Arial'
          Font.Style = []
          ParentFont = False
        end
        object RLLabel14: TRLLabel
          Left = 638
          Top = 21
          Width = 15
          Height = 14
          Alignment = taRightJustify
          Caption = '---'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -11
          Font.Name = 'Arial'
          Font.Style = []
          ParentFont = False
        end
        object RLLabel15: TRLLabel
          Left = 551
          Top = 21
          Width = 15
          Height = 14
          Alignment = taRightJustify
          Caption = '---'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -11
          Font.Name = 'Arial'
          Font.Style = []
          ParentFont = False
        end
        object RLDBText10: TRLDBText
          Left = 414
          Top = 20
          Width = 70
          Height = 15
          Alignment = taRightJustify
          AutoSize = False
          DataField = 'PROD_VALOR'
          DataSource = DSPesquisa
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -11
          Font.Name = 'Arial'
          Font.Style = []
          ParentFont = False
        end
        object RLDBText11: TRLDBText
          Left = 376
          Top = 2
          Width = 34
          Height = 15
          Alignment = taCenter
          AutoSize = False
          DataField = 'QTD_LOCAL'
          DataSource = DSPesquisa
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -11
          Font.Name = 'Arial'
          Font.Style = []
          ParentFont = False
        end
      end
      object RLBand6: TRLBand
        Left = 0
        Top = 0
        Width = 718
        Height = 23
        BandType = btColumnHeader
        Borders.Sides = sdCustom
        Borders.DrawLeft = False
        Borders.DrawTop = True
        Borders.DrawRight = False
        Borders.DrawBottom = True
        object RLDBText8: TRLDBText
          Left = 5
          Top = 5
          Width = 74
          Height = 16
          DataSource = DSPesquisa
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -13
          Font.Name = 'Arial'
          Font.Style = [fsBold]
          ParentFont = False
        end
      end
    end
  end
  inherited QPesquisa: TQuery
    Active = True
    SQL.Strings = (
      'SELECT'
      'produto.prod_valorcompra,'
      'produto.prod_valor,'
      'produto.prod_codigo,'
      'produto.prod_referencia,'
      'produto.prod_descricaoent,'
      'saldoestoque.sal_est_quantidadeest as QTD_estoque,'
      'saldolocal.sal_loc_quantidadedisp as QTD_local,'
      'saldoestoque.sal_est_customediounit as valor_custo,'
      'produto.prod_valor as valor_venda,'
      
        '(100 * (produto.prod_valor - saldoestoque.sal_est_customediounit' +
        ')) as Margem'
      'FROM produto'
      
        'INNER JOIN saldoestoque on (saldoestoque.sal_est_produto = produ' +
        'to.prod_codigo)'
      
        'INNER JOIN saldolocal on (saldolocal.sal_loc_produto = produto.p' +
        'rod_codigo)'
      
        'where (produto.excluido = '#39'N'#39' or produto.excluido is null) and (' +
        'produto.prod_ativo <> '#39'N'#39')')
    Left = 576
    Top = 289
  end
  inherited DSPesquisa: TDataSource
    Left = 440
    Top = 86
  end
  object DSLocal: TDataSource
    DataSet = DMGestao.QLocal
    Left = 512
    Top = 320
  end
  object DSGropoProduto: TDataSource
    DataSet = DMGestao.QGrupProduto
    Left = 520
    Top = 272
  end
  object DSClassProduto: TDataSource
    DataSet = DMGestao.QClassProduto
    Left = 456
    Top = 288
  end
  object QNfv: TQuery
    DatabaseName = 'base'
    SQL.Strings = (
      'SELECT'
      'itensnotafiscalvenda.itensnf_notafiscal as NF_NUMERO,'
      'itensnotafiscalvenda.itensnf_valorcusto as VALOR_CUSTO,'
      'notafiscalvenda.nf_dataemissao as DT_EMISSAO'
      'FROM notafiscalvenda'
      ''
      
        'inner join itensnotafiscalvenda on (itensnotafiscalvenda.itensnf' +
        '_notafiscal = notafiscalvenda.nf_codigo)'
      
        'inner join produto on (produto.prod_codigo = itensnotafiscalvend' +
        'a.itensnf_produto)'
      ''
      'where (notafiscalvenda.nf_situacao = 1) AND'
      '      (notafiscalvenda.nf_tipovenda = 18) AND'
      '      (itensnotafiscalvenda.itensnf_produto = 499)'
      ''
      'order by notafiscalvenda.nf_dataemissao desc')
    Left = 312
    Top = 264
    object QNfvNF_NUMERO: TIntegerField
      FieldName = 'NF_NUMERO'
    end
    object QNfvVALOR_CUSTO: TFloatField
      FieldName = 'VALOR_CUSTO'
    end
    object QNfvDT_EMISSAO: TDateTimeField
      FieldName = 'DT_EMISSAO'
    end
  end
  object DSNfv: TDataSource
    DataSet = QNfv
    Left = 240
    Top = 288
  end
end
